﻿@model PortalWeb.Areas.Admin.Models.CreateUserViewModel

@{
    ViewBag.Title = "添加用户";
    Layout = null;
}
@using (Ajax.BeginForm("Create", "User", new AjaxOptions
{
    InsertionMode = InsertionMode.Replace,
    HttpMethod = "POST",
    OnSuccess = "OnSuccess"
}, new {@class = "form-horizontal", role = "form"}))
{
    @Html.AntiForgeryToken()
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h4 id="myModalLabel" class="modal-title">@ViewBag.Title</h4>
        </div>
        <div class="modal-body">
            @Html.ValidationSummary("", new {@class = "text-danger"})
            <div class="form-group">
                @Html.LabelFor(m => m.UserName, new {@class = "col-md-2 control-label"})
                <div class="col-md-10">
                    @Html.TextBoxFor(m => m.UserName, new {@class = "form-control"})
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.Email, new {@class = "col-md-2 control-label"})
                <div class="col-md-10">
                    @Html.TextBoxFor(m => m.Email, new {@class = "form-control"})
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.NickName, new {@class = "col-md-2 control-label"})
                <div class="col-md-10">
                    @Html.TextBoxFor(m => m.NickName, new {@class = "form-control"})
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.PhoneNumber, new {@class = "col-md-2 control-label"})
                <div class="col-md-10">
                    @Html.TextBoxFor(m => m.PhoneNumber, new {@class = "form-control"})
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button type="submit" class="btn btn-primary">确定</button>
            <button class="btn  btn-default" data-dismiss="modal" aria-hidden="true">取消</button>
        </div>
    </div>
}
